import {http} from '@/http';

/**
 * 退出登录
 * @returns 
 */
export function userLogout() {
    return http.post('index.php/phone/User/logout');
}



/**
 * 修改密码
 * @param {*} data 
 * @returns 
 */
export function editPass(data) {
    return http.post('index.php/phone/user/getNewPwd', data);
}

/**
 * 获取用户信息
 * @returns 
 */
export function getUserinfo() {
    return http.post('index.php/user/userCenter/userInfo');
}

/**
 * 
 * 手机号修改
 * @param {object} data 
 * @returns 
 */
export function editPhone(data) {
    return http.post('', data);
}

/**
 * 获取客服信息
 * @returns 
 */
export function getServiseInfo(id) {
    return http.post('index.php/user/OrderSecond/userInfo_one', {user_id: id});
}

/**
 * 运费估算
 * @param {*} data 
 * @returns 
 */
export function freightEstimate(data) {
    return http.post('index.php/user/UserCenter/dispatchFeeCompute', data);
}

/**
 * 用户绑定微信
 * @param {String} code 
 */
export function userBindingWechat(code) {
	return http.post('index.php/user/userCenter/bindingAccount', {code});
}

/**
 * 用户信息修改
 * @param {Object} data 
 */
export function userinfoEdit(data) {
	return http.post('index.php/user/user/editInfo', data);
}